﻿

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>

</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <style type="text/css">
        body
        {
            margin: 0;
        }
        img
        {
            width: 208;
            height: 296mm;
            position: relative;
            left: 0mm;
            top: 0mm;
            z-index: -10;
        }
        table#ContentTable
        {
            border-collapse: collapse;
            table-layout: fixed;
            width: 166mm;
            position: absolute;
            left: 19mm;
            top: 133mm;
            border: 1px solid black;
        }
        table#ContentTable tr
        {
            height: 8.7mm;
        }
        table#ContentTable td
        {
            background: url("t.png") repeat;
            border: 0px solid gray;
            font-size: 3.2mm;
            padding: 0 1mm;
        }
        span[id], .print
        {
            position: absolute;
            font-size: 6mm;
        }
        .hide
        {
            display: none;
        }
    </style>
    <style media="print" type="text/css">
        table#ContentTable, table#ContentTable td
        {
            border: 0;
        }
    </style>
    <meta name="GENERATOR" content="MSHTML 9.00.8112.16437" />
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/app.js"></script>
</head>
<body>
    <img src="b.jpg" />
    <form name="MainForm" method="post" action="打印.aspx?%u7eb3%u7a0e%u4eba%u4ee3%u7801=22222342" id="MainForm" style="width: 800px;">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTEyNTc4MzU3NjUPZBYCAgMPZBYSAgEPDxYCHgRUZXh0BQNhc2RkZAIDDw8WAh8ABQQ2MDAwZGQCBQ8PFgIfAAUEMjAxMWRkAgcPDxYCHwAFAjExZGQCCQ8PFgIfAAUBMWRkAgsPDxYCHwAFBDIwMTFkZAINDw8WAh8ABQIxMWRkAg8PDxYCHwAFAjMwZGQCEQ9kFgZmD2QWCGYPDxYCHwAFBumHkeiejWRkAgEPDxYCHwAFBDYwMDBkZAICDw8WAh8ABQE1ZGQCAw8PFgIfAAUFMz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6wvnINIVwYyif8T0/JWwVYjNxJ"
            type="hidden" />
    </div>
    <table>
        <tr>
            <td colspan="2">
                <strong class="hide">FCDS-QR-164</strong>
            </td>
        </tr>
        <tr>
            <td class="style3" colspan="2">
                <strong class="hide">绵阳市涪城区地方税务局</strong>
            </td>
        </tr>
        <tr>
            <td class="style4" colspan="2" style="text-align: center">
                <strong class="hide">核定定额通知书</strong>
            </td>
        </tr>
        <tr>
            <td class="style5" colspan="2" style="text-align: center">
                <span class="hide">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ________税核[&nbsp;&nbsp;&nbsp;
                    ]号</span>
            </td>
        </tr>
        <tr>
            <td class="style6" colspan="2">
                &nbsp;
                <span id="lblName" class="print" style="font-weight:normal;left: 18mm; top: 69mm;">asd</span>
                <span class="hide">(纳税人):</span>
            </td>
        </tr>
        <tr>
            <td class="style5" colspan="2">
                <span class="hide">&nbsp;&nbsp;&nbsp;&nbsp; 根据《中华人民共和国税收征收管理法》、《中华人民共和国税收征收管理法实施细则》以及相关规定，经审核你户月应纳税额为</span><span id="lblMoney" class="print" style="font-weight:normal;left: 18mm; top: 97mm;">6000</span>
                <span class="hide">元（分税种税额见下表）。请按规定的期限申报缴纳应纳税款。本通知自</span><span id="lblStartYear" style="font-weight:normal;left: 40mm; top: 107mm">2011</span>
                <span class="hide">年</span><span id="lblStartMonth" style="font-weight:normal;left: 60mm; top: 107mm">11</span>
                <span class="hide">月</span><span id="lblStartDay" style="font-weight:normal;left: 75mm; top: 107mm">1</span>
                <span class="hide">日起至</span><span id="lblEndYear" style="font-weight:normal;left: 101mm; top: 107mm">2011</span>
                <span class="hide">年</span><span id="lblEndMonth" style="font-weight:normal;left: 120mm; top: 107mm">11</span>
                <span class="hide">月</span><span id="lblEndDay" style="font-weight:normal;left: 135mm; top: 107mm">30</span>
                <span class="hide">日止执行。</span>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center">
                <strong><span class="hide">应纳税额明细表</span></strong><br />
                <table id="ContentTable" border="0" style="border-style:None;">
	<tr>
		<td>金融</td><td>6000</td><td>5</td><td>300.0</td>
	</tr><tr>
		<td>企事业单位承包、承租经营所得1%</td><td>6000</td><td>1</td><td>60.0</td>
	</tr><tr>
		<td>非市区、县城、镇(增值税附征)</td><td>6000</td><td>1</td><td>60.0</td>
	</tr><tr>
		<td></td><td></td><td></td><td></td>
	</tr><tr>
		<td></td><td></td><td></td><td></td>
	</tr><tr>
		<td></td><td></td><td></td><td></td>
	</tr><tr>
		<td></td><td></td><td></td><td></td>
	</tr><tr>
		<td></td><td></td><td></td><td></td>
	</tr><tr>
		<td></td><td></td>
	</tr>
</table>
            </td>
        </tr>
        <tr>
            <td>
                <span class="hide">纳税人(签章):</span><br class="style5" />
                <span class="hide">&nbsp;&nbsp;&nbsp;&nbsp; 年&nbsp; 月&nbsp; 日</span>
            </td>
            <td>
                <span class="hide">税务机关(签章):</span><br class="style5" />
                <span class="hide">&nbsp;&nbsp;&nbsp;&nbsp; 年&nbsp; 月&nbsp; 日</span>
            </td>
        </tr>
        <tr>
            <td colspan="2" class="hide">
                告知事项：<br />
                1、定额执行期间内，如你户月应纳税经营额超过税务机关的核定定额百分之二十的应当在法律、行政法规规定的申报期限内，向主管税务机关进行申报并缴纳税款。<br />
                2、定期定额户应当在定额执行期满后___日内，以该期每月实际发生的经营额、所得额向主管税务机关进行分月汇总申报。<br />
                3、不按规定的期限进行申报或缴纳应纳税款的，税务机关将依法予以处罚。<br />
                此表一式三联：一联主管税务机关留存（黑） 二联 纳税人留存（红）三联&nbsp; 征税出留存（绿）
            </td>
        </tr>
    </table>
    <div id="project" style="display: none">
    <span code="01">增值税</span><span code="02">营业税</span><span code="03">消费税</span><span code="04">企业所得税</span><span code="06">个人所得税</span><span code="16">城市维护建设税</span><span code="61">教育费附加</span><span code="65">文化事业建设费收入</span><span code="90">地方教育费附加收入</span></div>
    <div id="item" style="display: none">
    <span code="0000" project_code="01" zssl="0">增值税</span><span code="1102" project_code="02" zssl="3">客运发票代开</span><span code="1101" project_code="02" zssl="10">出租租赁(10%)</span><span code="0999" project_code="02" zssl="5">其他销售不动产</span><span code="0906" project_code="02" zssl="1.50">出租租赁(1.5%)</span><span code="0905" project_code="02" zssl="5">售建筑物及土地附着物(免征)</span><span code="0904" project_code="02" zssl="5">销售其他土地附着物</span><span code="0903" project_code="02" zssl="3">出租租赁(3%)</span><span code="0902" project_code="02" zssl="5">出租租赁(5%)</span><span code="0901" project_code="02" zssl="5">售建筑物及土地附着物</span><span code="0899" project_code="02" zssl="5">其他转让无形资产</span><span code="0809" project_code="02" zssl="5">其它经济权益</span><span code="0806" project_code="02" zssl="5">转让商誉</span><span code="0805" project_code="02" zssl="5">著作权</span><span code="0804" project_code="02" zssl="5">商标权</span><span code="0803" project_code="02" zssl="5">非专利技术</span><span code="0802" project_code="02" zssl="5">专利权</span><span code="0801" project_code="02" zssl="5">转让土地使用权</span><span code="0710" project_code="02" zssl="5">仓储业</span><span code="0709" project_code="02" zssl="3">高速公路通行费收入</span><span code="0708" project_code="02" zssl="5">其他服务</span><span code="0707" project_code="02" zssl="3">公共交通业</span><span code="0706" project_code="02" zssl="5">广告业</span><span code="0705" project_code="02" zssl="5">旅游业</span><span code="0704" project_code="02" zssl="5">租赁业</span><span code="0703" project_code="02" zssl="5">旅店业</span><span code="0702" project_code="02" zssl="5">饮食业</span><span code="0701" project_code="02" zssl="5">代理业</span><span code="0690" project_code="02" zssl="5">垂钓</span><span code="0610" project_code="02" zssl="8">其他游艺</span><span code="0609" project_code="02" zssl="20">其它娱乐业</span><span code="0608" project_code="02" zssl="20">游戏</span><span code="0606" project_code="02" zssl="20">高尔夫球</span><span code="0605" project_code="02" zssl="5">保龄球</span><span code="0604" project_code="02" zssl="20">音乐茶座</span><span code="0603" project_code="02" zssl="5">台球</span><span code="0601" project_code="02" zssl="20">歌舞厅</span><span code="0503" project_code="02" zssl="3">教育</span><span code="0502" project_code="02" zssl="3">文化业</span><span code="0501" project_code="02" zssl="3">体育业</span><span code="0403" project_code="02" zssl="5">信息传输、计算机服务和软件业</span><span code="0402" project_code="02" zssl="3">邮政</span><span code="0401" project_code="02" zssl="3">电信</span><span code="0308" project_code="02" zssl="5">交强险</span><span code="0307" project_code="02" zssl="3">金融(3%)</span><span code="0306" project_code="02" zssl="5">其他金融</span><span code="0305" project_code="02" zssl="5">证券</span><span code="0304" project_code="02" zssl="3">农村信用社</span><span code="0303" project_code="02" zssl="5">典当</span><span code="0302" project_code="02" zssl="5">其他保险</span><span code="0301" project_code="02" zssl="5">金融</span><span code="0209" project_code="02" zssl="3">其他工程作业</span><span code="0205" project_code="02" zssl="5">销售不动产</span><span code="0204" project_code="02" zssl="3">修缮</span><span code="0203" project_code="02" zssl="3">装饰</span><span code="0202" project_code="02" zssl="3">安装</span><span code="0201" project_code="02" zssl="3">建筑</span><span code="0112" project_code="02" zssl="3">水上货物运输</span><span code="0111" project_code="02" zssl="3">水上旅客运输</span><span code="0110" project_code="02" zssl="3">公路货物运输</span><span code="0109" project_code="02" zssl="3">公路旅客运输</span><span code="0108" project_code="02" zssl="3">其它交通运输</span><span code="0106" project_code="02" zssl="3">装卸搬运</span><span code="0105" project_code="02" zssl="3">航空运输</span><span code="0104" project_code="02" zssl="3">水路运输</span><span code="0103" project_code="02" zssl="3">管道运输</span><span code="0102" project_code="02" zssl="3">公路运输</span><span code="0101" project_code="02" zssl="3">铁路运输</span><span code="0000" project_code="03" zssl="0">消费税</span><span code="0005" project_code="04" zssl="2.50">货物运输预征2.5%</span><span code="0003" project_code="04" zssl="0.20">企业所得税0.2%</span><span code="0002" project_code="04" zssl="2">建安企业预缴2%</span><span code="0001" project_code="04" zssl="10">特殊企业所得税10%</span><span code="0000" project_code="04" zssl="25">企业所得税</span><span code="0305" project_code="06" zssl="3">企事业单位承包、承租经营所得3%</span><span code="0304" project_code="06" zssl="2.50">企事业单位承包、承租经营所得2.5%</span><span code="0303" project_code="06" zssl="2">企事业单位承包、承租经营所得2%</span><span code="0302" project_code="06" zssl="1.50">企事业单位承包、承租经营所得1.5%</span><span code="0301" project_code="06" zssl="1">企事业单位承包、承租经营所得1%</span><span code="0300" project_code="06" zssl="0">企事业单位承包、承租经营所得</span><span code="0200" project_code="06" zssl="2.50">个体户生产经营所得</span><span code="0303" project_code="16" zssl="1">非市区、县城、镇(消费税附征)</span><span code="0302" project_code="16" zssl="1">非市区、县城、镇(营业税附征)</span><span code="0301" project_code="16" zssl="1">非市区、县城、镇(增值税附征)</span><span code="0203" project_code="16" zssl="5">县城、镇(消费税附征)</span><span code="0202" project_code="16" zssl="5">县城、镇(营业税附征)</span><span code="0201" project_code="16" zssl="5">县城、镇(增值税附征)</span><span code="0103" project_code="16" zssl="7">市区(消费税附征)</span><span code="0102" project_code="16" zssl="7">市区(营业税附征)</span><span code="0101" project_code="16" zssl="7">市区(增值税附征)</span><span code="0300" project_code="61" zssl="3">消费税附征</span><span code="0200" project_code="61" zssl="3">营业税附征</span><span code="0100" project_code="61" zssl="3">增值税附征</span><span code="0200" project_code="65" zssl="3">广告业</span><span code="0100" project_code="65" zssl="3">娱乐业</span><span code="0101" project_code="90" zssl="1">地方教育费附加</span></div>
    </form>
    <div class="item_panel" style="display: none">
        <select class="s_project">
        </select>
        <select class="s_item">
        </select>
        <input type="button" class="s_ok" value="确定" />
        <input type="button" class="s_cancel" value="取消" />
        <input type="button" class="s_clear" value="清除" />
    </div>
    <input type="text" class="item_edit" style="display: none" />
</body>
<script type="text/javascript">
    function digit_uppercase(n) {
        var fraction = ['角', '分'];
        var digit = [
            '零', '壹', '贰', '叁', '肆',
            '伍', '陆', '柒', '捌', '玖'
        ];
        var unit = [
            ['元', '万', '亿'],
            ['', '拾', '佰', '仟']
        ];
        var head = n < 0 ? '欠' : '';
        n = Math.abs(n);
        var s = '';
        for (var i = 0; i < fraction.length; i++) {
            s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
        }
        s = s || '整';
        n = Math.floor(n);
        for (var i = 0; i < unit[0].length && n > 0; i++) {
            var p = '';
            for (var j = 0; j < unit[1].length && n > 0; j++) {
                p = digit[n % 10] + unit[1][j] + p;
                n = Math.floor(n / 10);
            }
            s = p.replace(/(零.)*零$/, '')
             .replace(/^$/, '零')
          + unit[0][i] + s;
        }
        return head + s.replace(/(零.)*零元/, '元')
                   .replace(/(零.)+/g, '零')
                   .replace(/^整$/, '零元整');
    }
</script>
<script type="text/javascript">
    var projects = {};
    $(function () {
        // 引用itemPanel和itemEdit，因为它们detach了之后将不能通过上下文找到
        window.itemPanel = $("div.item_panel").detach().show();
        window.itemEdit = $("input.item_edit").detach().show();

        // 构建project数据结构
        $("div#project span").each(function () {
            var code = $(this).attr("code");
            var text = $(this).text();
            projects[code] = {
                text: text,
                items: [],
                toString: function () { return this.text; }
            };
        });

        // 构建item数据结构
        $("div#item span").each(function () {
            var code = $(this).attr("code");
            var text = $(this).text();
            var rate = $(this).attr("zssl");
            var parentCode = $(this).attr("project_code");

            var project = projects[parentCode];
            if (!project) { return; }

            project.items.push({
                text: text,
                rate: rate,
                toString: function () { return this.text; }
            });
        });

        var keys = [];
        for (var key in projects) { keys.push(key); }
        keys.sort();
        for (var i = 0; i < keys.length; i++) {
            project = projects[keys[i]];
            $("<option>").val(keys[i]).text(project.toString()).appendTo(itemPanel.find(".s_project"));
        }

        itemPanel.find(".s_item").change(function () {
            var rate = $(this).find("option:selected").attr("rate");
            var tr = itemPanel.parentsUntil("tr").parent("tr");
            tr.find("td:eq(2)").text(rate);
        });

        itemPanel.find(".s_project").change(function () {
            var projectCode = $(this).find("option:selected").val();
            var project = projects[projectCode];
            itemPanel.find(".s_item").empty();
            $.each(project.items, function (index, item) {
                $("<option>").text(item.toString())
                    .attr("rate", item.rate || "0")
                    .appendTo(itemPanel.find(".s_item"));
            });
            itemPanel.find(".s_item").change();
        }).change();

        // 将选择的数据保存在TR的data缓存中
        var saveData = function () {
            var tr = itemPanel.parentsUntil("tr").parent("tr");
            tr.data("p_code", itemPanel.find(".s_project option:selected").val());
            tr.data("i_code", itemPanel.find(".s_item option:selected").val());
            tr.data("i_text", itemPanel.find(".s_item option:selected").text());
            tr.data("i_rate", itemPanel.find(".s_item option:selected").attr("rate"));
            tr.data("i_amount", itemEdit.val());
            return tr;
        };

        var sum = function () {
            var sum = 0;
            $("table#ContentTable tr").find("td:eq(3)").each(function () {
                var n = Number($(this).text());
                if (isNaN(n)) { n = 0; }
                sum += n;
            });
            $("table#ContentTable tr:last td:last").text(digit_uppercase(sum));
        };

        var resetData = function (tr) {
            tr.find("td:first").text(tr.data("i_text"));
            tr.find("td:eq(1)").text(tr.data("i_amount"));
            tr.find("td:eq(2)").text(tr.data("i_rate"));

            var r = tr.data("i_amount") * tr.data("i_rate") / 100;
            tr.find("td:eq(3)").text(r);

            sum();
        };

        var loadData = function () {
            var tr = itemPanel.parentsUntil("tr").parent("tr");
            var projectCode = tr.data("p_code");
            if (!projectCode) {
                itemPanel.find(".s_item").change();
                itemEdit.val("");
                return;
            }

            itemEdit.val(tr.data("i_amount") || "");

            itemPanel.find(".s_project option").each(function () {
                if (projectCode === $(this).val()) {
                    $(this).attr("selected", true);
                    itemPanel.find(".s_project").change();
                    return false;
                }
            });

            var itemCode = tr.data("i_code");
            if (!itemCode) {
                itemPanel.find(".s_item").change();
                return;
            }

            itemPanel.find(".s_item option").each(function () {
                if (itemCode === $(this).val()) {
                    $(this).attr("selected", true);
                    return false;
                }
            });

            itemPanel.find(".s_item").change();
            return tr;
        };

        var onOk = function () {
            setTimeout(function () {
                var tr = saveData();
                itemPanel.detach();
                itemEdit.detach();
                resetData(tr);
            }, 50);
        };

        itemEdit.keypress(function (event) {
            if (event.keyCode === 13) {
                onOk();
                event.preventDefault();
            }
        }).keydown(function (event) {
            if (event.altKey || event.ctrlKey) {
                return;
            }

            if (isCtrlKey(event.keyCode)) {
                return;
            }

            var ch = keyChar(event);
            if (/[0-9\.]/.test(ch)) { return; }
            else { return false; }
        });

        itemPanel.find(".s_ok").click(onOk);

        itemPanel.find(".s_cancel").click(function () {
            var me = $(this);
            setTimeout(function () {
                var tr = me.parentsUntil("tr").parent("tr");
                itemPanel.detach();
                itemEdit.detach();
                resetData(tr);
            }, 50);
        });

        itemPanel.find(".s_clear").click(function () {
            var me = $(this);
            setTimeout(function () {
                var tr = me.parentsUntil("tr").parent("tr");
                itemPanel.detach();
                itemEdit.detach();
                tr.find("td:first").empty();
            }, 50);
        });

        $("table#ContentTable tr:not(:first)").find("td:first, td:eq(1)").click(function () {
            if (itemPanel.is(":visible")) {
                return;
            }

            var tr = $(this).parent("tr");
            itemPanel.appendTo(tr.find("td:first").html(""));
            itemEdit.appendTo(tr.find("td:eq(1)").html(""));
            loadData();

            if ($(this).index() === 1) {
                itemEdit.focus();
            }
        });

        $(function () {
            sum();
            $("table#ContentTable tr").find("td:first").css("width", "40mm")
                .end().find("td:eq(1)").css("width", "40mm")
                .end().find("td:eq(2)").css("width", "40mm")
                .end().last().find("td:last").attr("colspan", 3).css("text-align", "left");
        });
    });
</script>
</html>
